<HTML>
<HEAD>
<TITLE>[Chapter 19] Graphics</TITLE>
<META NAME="author" CONTENT="John Zukowski">
<META NAME="date" CONTENT="Thu Jul 31 15:12:51 1997">
<META NAME="form" CONTENT="html">
<META NAME="metadata" CONTENT="dublincore.0.1">
<META NAME="objecttype" CONTENT="book part">
<META NAME="otheragent" CONTENT="gmat dbtohtml">
<META NAME="publisher" CONTENT="O'Reilly &amp; Associates, Inc.">
<META NAME="source" CONTENT="SGML">
<META NAME="subject" CONTENT="Java AWT">
<META NAME="title" CONTENT="Java AWT">
<META HTTP-EQUIV="Content-Script-Type" CONTENT="text/javascript">
</HEAD>
<body vlink="#551a8b" alink="#ff0000" text="#000000" bgcolor="#FFFFFF" link="#0000ee">

<DIV CLASS=htmlnav>
<H1><a href='index.htm'><IMG SRC="gifs/smbanner.gif"
     ALT="Java AWT" border=0></a></H1>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch19_26.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><B><FONT FACE="ARIEL,HELVETICA,HELV,SANSERIF" SIZE="-1">Chapter 19<br>java.awt Reference</FONT></B></TD>
<td width=172 align=right valign=top><A HREF="ch19_28.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
</table>

&nbsp;
<hr align=left width=515>
</DIV>
<DIV CLASS=refnamediv>
<H1>Graphics</H1>

<H2>Name</H2>

Graphics

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch19-REFSECT1-AUTOID.27"></A></h2>
</DIV>


<p>
<img align=middle src="./figs/graphic.gif" alt="[Graphic: Figure from the text]" width=502 height=52 border=0>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-1">Description</A></h2>

<P CLASS=para>
The <tt CLASS=literal>Graphics</tt> class is an abstract 
class that represents an object on which you can draw. The concrete classes 
that are actually used to represent graphics objects are platform dependent, 
but because they extend the <tt CLASS=literal>Graphics</tt> 
class, must implement the methods here. 

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-2">Class Definition</A></h2>

<DIV CLASS=screen>
<P>
<PRE>
public abstract class java.awt.Graphics
    extends java.lang.Object {
  
  // Constructors
  protected Graphics();
  
  // Instance Methods
  public abstract void clearRect (int x, int y, int width, int height);
  public abstract void clipRect (int x, int y, int width, int height);
  public abstract void copyArea (int x, int y, int width, int height, 
      int deltax, int deltay);
  public abstract Graphics create();
  public Graphics create (int x, int y, int width, int height);
  public abstract void dispose();
  public void draw3DRect (int x, int y, int width, int height, 
      boolean raised);
  public abstract void drawArc (int x, int y, int width, int height, 
      int startAngle, int arcAngle);
  public void drawBytes (byte text[], int offset, int length, 
      int x, int y);
  public void drawChars (char text[], int offset, int length, 
      int x, int y);
  public abstract boolean drawImage (Image image, int x, int y, 
      ImageObserver observer);
  public abstract boolean drawImage (Image image, int x, int y, 
      int width, int height, ImageObserver observer);
  public abstract boolean drawImage (Image image, int x, int y, 
      Color backgroundColor, ImageObserver observer);
  public abstract boolean drawImage (Image image, int x, int y, 
      int width, int height, Color backgroundColor, ImageObserver observer);
  public abstract boolean drawImage(Image img, int dx1, int dy1, 
      int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver 
      observer); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public abstract boolean drawImage(Image img, int dx1, int dy1, 
      int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, 
      ImageObserver observer); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public abstract void drawLine (int x1, int y1, int x2, int y2);
  public abstract void drawOval (int x, int y, int width, int height);
  public abstract void drawPolygon (int xPoints[], int yPoints[], 
      int numPoints);
  public void drawPolygon (Polygon p);
  public abstract void drawPolyline(int[ ] xPoints, int[ ] yPoints, 
      int nPoints); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public void drawRect (int x, int y, int width, int height);
  public abstract void drawRoundRect (int x, int y, int width, 
      int height, int arcWidth, int arcHeight);
  public abstract void drawString (String text, int x, int y);
  public void fill3DRect (int x, int y, int width, int height, 
      boolean raised);
  public abstract void fillArc (int x, int y, int width, int height, 
      int startAngle, int arcAngle);
  public abstract void fillOval (int x, int y, int width, int height);
  public abstract void fillPolygon (int xPoints[], int yPoints[], 
      int numPoints);
  public void fillPolygon (Polygon p);
  public abstract void fillRect (int x, int y, int width, int height);
  public abstract void fillRoundRect (int x, int y, int width, 
      int height, int arcWidth, int arcHeight);
  public void finalize();
  public abstract Shape getClip(); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public abstract Rectangle getClipBounds(); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public abstract Rectangle getClipRect();
  public abstract Color getColor();
  public abstract Font getFont();
  public FontMetrics getFontMetrics();
  public abstract FontMetrics getFontMetrics (Font font);
  public abstract void setClip (int x, int y, int width, int height); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public abstract void setClip (Shape clip); <img src="gifs/bstar.gif" alt="(New)" border=0>
  public abstract void setColor (Color color);
  public abstract void setFont (Font font);
  public abstract void setPaintMode();
  public abstract void setXORMode (Color xorColor);
  public String toString();
  public abstract void translate (int x, int y);
}
</PRE>
</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-3">Constructors</A></h2>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-3.1">Graphics</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-3.1.1">protected Graphics()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Called by constructors of platform specific subclasses. </DL>
</DIV>

</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4">Instance Methods</A></h2>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.1">clearRect</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.1.1">public abstract void clearRect (int x, int y, int width, int height)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>x</I><br>
<DD>

<P CLASS=para>
x coordinate of origin 
of area to clear. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y</I><br>
<DD>

<P CLASS=para>
y coordinate of origin 
of area to clear. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>width</I><br>
<DD>

<P CLASS=para>
size in horizontal 
direction to clear. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>height</I><br>
<DD>

<P CLASS=para>
size in vertical direction 
to clear. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Resets a rectangular area to the background color. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.2">clipRect</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.2.1">public abstract void clipRect (int x, int y, int width, int height)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>x</I><br>
<DD>

<P CLASS=para>
x coordinate of origin 
of clipped area. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y</I><br>
<DD>

<P CLASS=para>
y coordinate of origin 
of clipped area. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>width</I><br>
<DD>

<P CLASS=para>
size in horizontal 
direction to clip. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>height</I><br>
<DD>

<P CLASS=para>
size in vertical direction 
to clip. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Reduces the drawing area to the intersection of the current drawing area 
and the rectangular area defined by <tt CLASS=literal>x</tt>, 
<tt CLASS=literal>y</tt>, <tt CLASS=literal>width</tt>, 
and <tt CLASS=literal>height</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.3">copyArea</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.3.1">public abstract void copyArea (int x, int y, int width, int height, int deltax, int deltay)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>x</I><br>
<DD>

<P CLASS=para>
x coordinate of origin 
of area to copy. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y</I><br>
<DD>

<P CLASS=para>
y coordinate of origin 
of area to copy. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>width</I><br>
<DD>

<P CLASS=para>
size in horizontal 
direction to copy. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>height</I><br>
<DD>

<P CLASS=para>
size in vertical direction 
to copy. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>deltax</I><br>
<DD>

<P CLASS=para>
offset in horizontal 
direction to copy area to. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>deltay</I><br>
<DD>

<P CLASS=para>
offset in vertical 
direction to copy area to. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Copies a rectangular area to a new area, whose top left corner is (<tt CLASS=literal>x+deltax</tt>, 
<tt CLASS=literal>y+deltay</tt>). </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.4">create</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.4.1">public abstract Graphics create()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
New graphics context. 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Creates a second reference to the same graphics context. </DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.4.2">public Graphics create (int x, int y, int width, int height)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>x</I><br>
<DD>

<P CLASS=para>
x coordinate of origin 
of new graphics context. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y</I><br>
<DD>

<P CLASS=para>
y coordinate of origin 
of new graphics context. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>width</I><br>
<DD>

<P CLASS=para>
size in horizontal 
direction. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>height</I><br>
<DD>

<P CLASS=para>
size in vertical direction. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
New graphics context 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Creates a second reference to a subset of the same graphics context. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.5">dispose</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.5.1">public abstract void dispose()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Frees system resources used by graphics context. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.6">draw3DRect</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.6.1">public void draw3DRect (int x, int y, int width, int height, boolean raised)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>x</I><br>
<DD>

<P CLASS=para>
x coordinate of the rectangle 
origin. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y</I><br>
<DD>

<P CLASS=para>
y coordinate of the rectangle 
origin 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>width</I><br>
<DD>

<P CLASS=para>
Width of the rectangle 
to draw. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>height</I><br>
<DD>

<P CLASS=para>
Height of the rectangle 
to draw. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>raised</I><br>
<DD>

<P CLASS=para>
Determines if rectangle 
drawn is raised or not; <tt CLASS=literal>true</tt> 
for a raised rectangle. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Draws an unfilled 3-D rectangle from (<tt CLASS=literal>x</tt>, 
<tt CLASS=literal>y</tt>) of size <tt CLASS=literal>width</tt> 
x <tt CLASS=literal>height</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.7">drawArc</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.7.1">public abstract void drawArc (int x, int y, int width, int height, int startAngle, int arcAngle)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>x</I><br>
<DD>

<P CLASS=para>
x coordinate of the bounding 
rectangle's origin. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y</I><br>
<DD>

<P CLASS=para>
y coordinate of the bounding 
rectangle's origin 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>width</I><br>
<DD>

<P CLASS=para>
Width of the bounding 
rectangle for the arc. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>height</I><br>
<DD>

<P CLASS=para>
Height of the bounding 
rectangle for the arc. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>startAngle</I><br>
<DD>

<P CLASS=para>
Angle at which arc begins, in degrees 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>arcAngle</I><br>
<DD>

<P CLASS=para>
length of arc, in 
degrees </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Draws an unfilled arc from <tt CLASS=literal>startAngle</tt> 
to <tt CLASS=literal>arcAngle</tt> within bounding 
rectangle from (<tt CLASS=literal>x</tt>, <tt CLASS=literal>y</tt>) 
of size <tt CLASS=literal>width</tt> x <tt CLASS=literal>height</tt>. 
Zero degrees is at three o'clock; positive angles are counter clockwise. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.8">drawBytes</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.8.1">public void drawBytes (byte text[], int offset, int length, int x, int y)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>text</I><br>
<DD>

<P CLASS=para>
Text to draw, as a byte array. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>offset</I><br>
<DD>

<P CLASS=para>
Starting position within <tt CLASS=literal>text</tt> to draw. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>length</I><br>
<DD>

<P CLASS=para>
Number of bytes to draw. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>x</I><br>
<DD>

<P CLASS=para>
x coordinate of baseline 
origin. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y</I><br>
<DD>

<P CLASS=para>
y coordinate of baseline 
origin. </DL>
<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>ArrayIndexOutOfBoundsException</I><br>
<DD>

<P CLASS=para>
If 
<tt CLASS=literal>offset</tt> or <tt CLASS=literal>length</tt> 
is invalid. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Draws text on screen, starting with <tt CLASS=literal>text[offset]</tt> 
and ending with <tt CLASS=literal>text[offset+length-1]</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.9">drawChars</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.9.1">public void drawChars (char text[], int offset, int length, int x, int y)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>text</I><br>
<DD>

<P CLASS=para>
Text to draw, as a char array. 

<p>
<DT CLASS=varlistentry>offset<br>
<DD>

<P CLASS=para>
Starting position within 
<tt CLASS=literal>text</tt> to draw. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>length</I><br>
<DD>

<P CLASS=para>
Number of bytes to draw. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>x</I><br>
<DD>

<P CLASS=para>
x coordinate of baseline 
origin. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y</I><br>
<DD>

<P CLASS=para>
y coordinate of baseline 
origin. </DL>
<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>ArrayIndexOutOfBoundsException</I><br>
<DD>

<P CLASS=para>
If 
<tt CLASS=literal>offset</tt> or <tt CLASS=literal>length</tt> 
is invalid. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Draws text on screen, starting with <tt CLASS=literal>text[offset]</tt> 
and ending with <tt CLASS=literal>text[offset+length-1]</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.10">drawImage</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.10.1">public abstract boolean drawImage (Image image, int x, int y, ImageObserver observer)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>image</I><br>
<DD>

<P CLASS=para>
Image to draw. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>x</I><br>
<DD>

<P CLASS=para>
x coordinate of image origin. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y</I><br>
<DD>

<P CLASS=para>
y coordinate of image origin. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>observer</I><br>
<DD>

<P CLASS=para>
Object that watches 
for image information; almost always <tt CLASS=literal>this</tt>. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>true</tt> if the image has fully 
loaded when the method returns, <tt CLASS=literal>false</tt> 
otherwise. 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Draws image to screen at (<tt CLASS=literal>x</tt>, 
<tt CLASS=literal>y</tt>), at its original size. Drawing 
may be asynchronous. If <tt CLASS=literal>image</tt> 
is not fully loaded when the method returns, <tt CLASS=literal>observer</tt> 
is notified when additional information made available. </DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.10.2">public abstract boolean drawImage (Image image, int x, int y, int width, int height, ImageObserver observer)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>image</I><br>
<DD>

<P CLASS=para>
Image to draw. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>x</I><br>
<DD>

<P CLASS=para>
x coordinate of image origin. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y</I><br>
<DD>

<P CLASS=para>
y coordinate of image origin. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>width</I><br>
<DD>

<P CLASS=para>
New image size in horizontal 
direction. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>height</I><br>
<DD>

<P CLASS=para>
New image size in 
vertical direction. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>observer</I><br>
<DD>

<P CLASS=para>
Object that watches 
for image information; almost always <tt CLASS=literal>this</tt>. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>true</tt> if the image has fully 
loaded when the method returns, <tt CLASS=literal>false</tt> 
otherwise. 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Draws image to screen at (<tt CLASS=literal>x</tt>, 
<tt CLASS=literal>y</tt>), scaled to <tt CLASS=literal>width</tt> 
x <tt CLASS=literal>height</tt>. Drawing may be asynchronous. 
If <tt CLASS=literal>image</tt> is not fully loaded 
when the method returns, <tt CLASS=literal>observer</tt> 
is notified when additional information made available. </DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.10.3">public abstract boolean drawImage (Image image, int x, int y, Color backgroundColor, ImageObserver observer)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>image</I><br>
<DD>

<P CLASS=para>
Image to draw. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>x</I><br>
<DD>

<P CLASS=para>
x coordinate of image origin. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y</I><br>
<DD>

<P CLASS=para>
y coordinate of image origin. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>backgroundColor</I><br>
<DD>

<P CLASS=para>
Color to 
show through image where transparent. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>observer</I><br>
<DD>

<P CLASS=para>
Object that watches 
for image information; almost always <tt CLASS=literal>this</tt>. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>true</tt> if the image has fully 
loaded when the method returns, <tt CLASS=literal>false</tt> 
otherwise. 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Draws image to screen at (<tt CLASS=literal>x</tt>, 
<tt CLASS=literal>y</tt>), at its original size. Drawing 
may be asynchronous. If <tt CLASS=literal>image</tt> 
is not fully loaded when the method returns, <tt CLASS=literal>observer</tt> 
is notified when additional information made available. The background 
color is visible through any transparent pixels. </DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.10.4">public abstract boolean drawImage (Image image, int x, int y, int width, int height, Color backgroundColor, ImageObserver observer)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>image</I><br>
<DD>

<P CLASS=para>
Image to draw. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>x</I><br>
<DD>

<P CLASS=para>
x coordinate of image origin. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y</I><br>
<DD>

<P CLASS=para>
y coordinate of image origin. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>width</I><br>
<DD>

<P CLASS=para>
New image size in horizontal 
direction. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>height</I><br>
<DD>

<P CLASS=para>
New image size in 
vertical direction. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>backgroundColor</I><br>
<DD>

<P CLASS=para>
Color to 
show through image where transparent. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>observer</I><br>
<DD>

<P CLASS=para>
Object that watches 
for image information; almost always <tt CLASS=literal>this</tt>. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>true</tt> if the image has fully 
loaded when the method returns, <tt CLASS=literal>false</tt> 
otherwise. 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Draws image to screen at (<tt CLASS=literal>x</tt>, 
<tt CLASS=literal>y</tt>), scaled to <tt CLASS=literal>width</tt> 
x <tt CLASS=literal>height</tt>. Drawing may be asynchronous. 
If <tt CLASS=literal>image</tt> is not fully loaded 
when the method returns, <tt CLASS=literal>observer</tt> 
is notified when additional information made available. The background 
color is visible through any transparent pixels. </DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.10.5">public abstract boolean drawImage (Image image, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>image</I><br>
<DD>

<P CLASS=para>
Image to draw. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>dx1</I><br>
<DD>

<P CLASS=para>
x 
coordinate of one corner of destination (device) rectangle. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>dy1</I><br>
<DD>

<P CLASS=para>
y coordinate of one 
corner of destination (device) rectangle. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>dx2</I><br>
<DD>

<P CLASS=para>
x 
coordinate of the opposite corner of destination (device) rectangle. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>dy2</I><br>
<DD>

<P CLASS=para>
y coordinate of the opposite corner of destination (device) rectangle. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>sx1</I><br>
<DD>

<P CLASS=para>
x 
coordinate of one corner of source (image) rectangle. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>sy1</I><br>
<DD>

<P CLASS=para>
y coordinate of one corner of source (image) rectangle. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>sx2</I><br>
<DD>

<P CLASS=para>
x 
coordinate of the opposite corner of source (image) rectangle. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>sy2</I><br>
<DD>

<P CLASS=para>
y coordinate of the opposite corner of source (image) rectangle. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>observer</I><br>
<DD>

<P CLASS=para>
Object that watches 
for image information; almost always <tt CLASS=literal>this</tt>. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>true</tt> if the image has fully 
loaded when the method returns, <tt CLASS=literal>false</tt> 
otherwise. 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Draws the part of image described by <tt CLASS=literal>dx1</tt>, 
<tt CLASS=literal>dy1</tt>, <tt CLASS=literal>dx2</tt>, 
and <tt CLASS=literal>dy2</tt> to the screen into 
the rectangle described by <tt CLASS=literal>sx1</tt>, 
<tt CLASS=literal>sy1</tt>, <tt CLASS=literal>sx2</tt>, 
and <tt CLASS=literal>sy2</tt>. Drawing may be asynchronous. 
If <tt CLASS=literal>image</tt> is not fully loaded 
when the method returns, <tt CLASS=literal>observer</tt> 
is notified when additional information is made available. </DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.10.6">public abstract boolean drawImage (Image image, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color backgroundColor, ImageObserver observer) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>image</I><br>
<DD>

<P CLASS=para>
Image to draw. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>dx1</I><br>
<DD>

<P CLASS=para>
x 
coordinate of one corner of destination (device) rectangle. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>dy1</I><br>
<DD>

<P CLASS=para>
y coordinate of one corner of destination (device) rectangle. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>dx2</I><br>
<DD>

<P CLASS=para>
x 
coordinate of the opposite corner of destination (device) rectangle. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>dy2</I><br>
<DD>

<P CLASS=para>
y coordinate of the opposite 
corner of destination (device) rectangle. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>sx1</I><br>
<DD>

<P CLASS=para>
x 
coordinate of one corner of source (image) rectangle. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>sy1</I><br>
<DD>

<P CLASS=para>
y coordinate of one 
corner of source (image) rectangle. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>sx2</I><br>
<DD>

<P CLASS=para>
x 
coordinate of the opposite corner of source (image) rectangle. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>sy2</I><br>
<DD>

<P CLASS=para>
y coordinate of the opposite 
corner of source (image) rectangle. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>backgroundColor</I><br>
<DD>

<P CLASS=para>
Color to 
show through image where transparent. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>observer</I><br>
<DD>

<P CLASS=para>
Object that watches 
for image information; almost always <tt CLASS=literal>this</tt>. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>true</tt> if the image has fully 
loaded when the method returns, <tt CLASS=literal>false</tt> 
otherwise. 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Draws the part of image described by <tt CLASS=literal>dx1</tt>, 
<tt CLASS=literal>dy1</tt>, <tt CLASS=literal>dx2</tt>, 
and <tt CLASS=literal>dy2</tt> to the screen into 
the rectangle described by <tt CLASS=literal>sx1</tt>, 
<tt CLASS=literal>sy1</tt>, <tt CLASS=literal>sx2</tt>, 
and <tt CLASS=literal>sy2</tt>. Drawing may be asynchronous. 
If <tt CLASS=literal>image</tt> is not fully loaded 
when the method returns, <tt CLASS=literal>observer</tt> 
is notified when additional information made available. The background 
color is visible through any transparent pixels. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.11">drawLine</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.11.1">public abstract void drawLine (int x1, int y1, int x2, int y2)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>x1</I><br>
<DD>

<P CLASS=para>
x coordinate of one 
point on line. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y1</I><br>
<DD>

<P CLASS=para>
y coordinate of one 
point on line. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>x2</I><br>
<DD>

<P CLASS=para>
x coordinate of the opposite 
point on line. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y2</I><br>
<DD>

<P CLASS=para>
y coordinate of the opposite 
point on line. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Draws a line connecting <tt CLASS=literal>(x1, y1)</tt> 
and <tt CLASS=literal>(x2, y2)</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.12">drawOval</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.12.1">public abstract void drawOval (int x, int y, int width, int height)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>x</I><br>
<DD>

<P CLASS=para>
x coordinate of bounding 
rectangle origin. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y</I><br>
<DD>

<P CLASS=para>
y coordinate of bounding 
rectangle origin 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>width</I><br>
<DD>

<P CLASS=para>
Width of bounding rectangle 
to draw in. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>height</I><br>
<DD>

<P CLASS=para>
Height of bounding 
rectangle to draw in. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Draws an unfilled oval within bounding rectangle from (<tt CLASS=literal>x</tt>, 
<tt CLASS=literal>y</tt>) of size <tt CLASS=literal>width</tt> 
x <tt CLASS=literal>height</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.13">drawPolygon</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.13.1">public abstract void drawPolygon (int xPoints[], int yPoints[], int numPoints)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>xPoints[]</I><br>
<DD>

<P CLASS=para>
The array of x coordinates for each point. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>yPoints[]</I><br>
<DD>

<P CLASS=para>
The array of y coordinates for each point. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>numPoints</I><br>
<DD>

<P CLASS=para>
The number of elements in both <tt CLASS=literal>xPoints</tt> 
and <tt CLASS=literal>yPoints</tt> arrays to use. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Draws an unfilled polygon based on first <tt CLASS=literal>numPoints</tt> 
elements in <tt CLASS=literal>xPoints</tt> and <tt CLASS=literal>yPoints</tt>. </DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.13.2">public void drawPolygon (Polygon p)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>p</I><br>
<DD>

<P CLASS=para>
Points of object to draw. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Draws an unfilled polygon based on points within the <tt CLASS=literal>Polygon 
p</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.14">drawPolyline</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.14.1">public abstract void drawPolyline (int xPoints[], int yPoints[], int nPoints) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>xPoints[]</I><br>
<DD>

<P CLASS=para>
The array of x coordinates for each point. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>yPoints[]</I><br>
<DD>

<P CLASS=para>
The array of y coordinates for each point. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>nPoints</I><br>
<DD>

<P CLASS=para>
The number of elements in both <tt CLASS=literal>xPoints</tt> 
and <tt CLASS=literal>yPoints</tt> arrays to use. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Draws a series of line segments based on first <tt CLASS=literal>numPoints</tt> 
elements in <tt CLASS=literal>xPoints</tt> and <tt CLASS=literal>yPoints</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.15">drawRect</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.15.1">public void drawRect (int x, int y, int width, int height)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>x</I><br>
<DD>

<P CLASS=para>
x coordinate of rectangle 
origin. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y</I><br>
<DD>

<P CLASS=para>
y coordinate of rectangle 
origin 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>width</I><br>
<DD>

<P CLASS=para>
Width of rectangle 
to draw. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>height</I><br>
<DD>

<P CLASS=para>
Height of rectangle 
to draw. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Draws an unfilled rectangle from (<tt CLASS=literal>x</tt>, 
<tt CLASS=literal>y</tt>) of size <tt CLASS=literal>width</tt> 
x <tt CLASS=literal>height</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.16">drawRoundRect</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.16.1">public abstract void drawRoundRect (int x, int y, int width, int height, int arcWidth, int arcHeight)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>x</I><br>
<DD>

<P CLASS=para>
x coordinate of bounding 
rectangle origin. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y</I><br>
<DD>

<P CLASS=para>
y coordinate of bounding 
rectangle origin 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>width</I><br>
<DD>

<P CLASS=para>
Width of rectangle 
to draw. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>height</I><br>
<DD>

<P CLASS=para>
Height of rectangle 
to draw. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>arcWidth</I><br>
<DD>

<P CLASS=para>
Width of arc of 
rectangle corner. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>arcHeight</I><br>
<DD>

<P CLASS=para>
Height of arc of 
rectangle corner. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Draws an unfilled rectangle from (<tt CLASS=literal>x</tt>, 
<tt CLASS=literal>y</tt>) of size <tt CLASS=literal>width</tt> 
x <tt CLASS=literal>height</tt> with rounded corners. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.17">drawString</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.17.1">public abstract void drawString (String text, int x, int y)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>text</I><br>
<DD>

<P CLASS=para>
Text to draw. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>x</I><br>
<DD>

<P CLASS=para>
x coordinate of baseline 
origin. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y</I><br>
<DD>

<P CLASS=para>
y coordinate of baseline 
origin. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Draws text on screen. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.18">fill3DRect</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.18.1">public void fill3DRect (int x, int y, int width, int height, boolean raised)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>x</I><br>
<DD>

<P CLASS=para>
x coordinate of rectangle 
origin. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y</I><br>
<DD>

<P CLASS=para>
y coordinate of rectangle 
origin 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>width</I><br>
<DD>

<P CLASS=para>
Width of rectangle 
to draw. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>height</I><br>
<DD>

<P CLASS=para>
Height of rectangle 
to draw. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>raised</I><br>
<DD>

<P CLASS=para>
<tt CLASS=literal>true</tt> 
to draw a rectangle that appears raised; <tt CLASS=literal>false</tt> 
to draw a rectangle that appears depressed. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Draws a filled 3-D rectangle from (<tt CLASS=literal>x</tt>, 
<tt CLASS=literal>y</tt>) of size <tt CLASS=literal>width</tt> 
x <tt CLASS=literal>height</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.19">fillArc</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.19.1">public abstract void fillArc (int x, int y, int width, int height, int startAngle, int arcAngle)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>x</I><br>
<DD>

<P CLASS=para>
x coordinate of bounding 
rectangle origin. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y</I><br>
<DD>

<P CLASS=para>
y coordinate of bounding 
rectangle origin 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>width</I><br>
<DD>

<P CLASS=para>
Width of bounding rectangle 
to draw in. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>height</I><br>
<DD>

<P CLASS=para>
Height of bounding 
rectangle to draw in. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>startAngle</I><br>
<DD>

<P CLASS=para>
Starting angle 
of arc. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>arcAngle</I><br>
<DD>

<P CLASS=para>
The extent of the 
arc, measured from startAngle </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Draws a filled arc from <tt CLASS=literal>startAngle</tt> 
to <tt CLASS=literal>arcAngle</tt> within bounding 
rectangle from (<tt CLASS=literal>x</tt>, <tt CLASS=literal>y</tt>) 
of size <tt CLASS=literal>width</tt> x <tt CLASS=literal>height</tt>. 
Zero degrees is at three o'clock; positive angles are counter clockwise. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.20">fillOval</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.20.1">public abstract void fillOval (int x, int y, int width, int height)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>x</I><br>
<DD>

<P CLASS=para>
x coordinate of bounding 
rectangle origin. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y</I><br>
<DD>

<P CLASS=para>
y coordinate of bounding 
rectangle origin 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>width</I><br>
<DD>

<P CLASS=para>
Width of bounding rectangle 
to draw in. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>height</I><br>
<DD>

<P CLASS=para>
Height of bounding 
rectangle to draw in. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Draws filled oval within bounding rectangle from (<tt CLASS=literal>x</tt>, 
<tt CLASS=literal>y</tt>) of size <tt CLASS=literal>width</tt> 
x <tt CLASS=literal>height</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.21">fillPolygon</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.21.1">public abstract void fillPolygon (int xPoints[], int yPoints[], int numPoints)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>xPoints[]</I><br>
<DD>

<P CLASS=para>
The array of x coordinates for each point. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>yPoints[]</I><br>
<DD>

<P CLASS=para>
The array of y coordinates for each point. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>numPoints</I><br>
<DD>

<P CLASS=para>
The number of elements in both <tt CLASS=literal>xPoints</tt> 
and <tt CLASS=literal>yPoints</tt> arrays to use. </DL>
<p>
<DT CLASS=varlistentry>Throws<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>ArrayIndexOutOfBoundsException</I><br>
<DD>

<P CLASS=para>
If 
<tt CLASS=literal>numPoints</tt> &gt; <tt CLASS=literal>xPoints.length</tt> 
or <tt CLASS=literal>numPoints</tt> &gt; <tt CLASS=literal>yPoints.length</tt>. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Draws filled polygon based on first <tt CLASS=literal>numPoints</tt> 
elements in <tt CLASS=literal>xPoints</tt> and <tt CLASS=literal>yPoints</tt>. </DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.21.2">public void fillPolygon (Polygon p)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>p</I><br>
<DD>

<P CLASS=para>
Points of object to draw. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Draws filled polygon based on points within the <tt CLASS=literal>Polygon 
p</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.22">fillRect</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.22.1">public abstract void fillRect (int x, int y, int width, int height)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>x</I><br>
<DD>

<P CLASS=para>
x coordinate of rectangle 
origin. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y</I><br>
<DD>

<P CLASS=para>
y coordinate of rectangle 
origin 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>width</I><br>
<DD>

<P CLASS=para>
Width of rectangle 
to draw. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>height</I><br>
<DD>

<P CLASS=para>
Height of rectangle 
to draw. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Draws filled rectangle from (<tt CLASS=literal>x</tt>, 
<tt CLASS=literal>y</tt>) of size <tt CLASS=literal>width</tt> 
x <tt CLASS=literal>height</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.23">fillRoundRect</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.23.1">public abstract void fillRoundRect (int x, int y, int width, int height, int arcWidth, int arcHeight)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>x</I><br>
<DD>

<P CLASS=para>
x coordinate of bounding 
rectangle origin. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y</I><br>
<DD>

<P CLASS=para>
y coordinate of bounding 
rectangle origin 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>width</I><br>
<DD>

<P CLASS=para>
Width of rectangle 
to draw. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>height</I><br>
<DD>

<P CLASS=para>
Height of rectangle 
to draw. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>arcWidth</I><br>
<DD>

<P CLASS=para>
Width of arc of 
rectangle corner. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>arcHeight</I><br>
<DD>

<P CLASS=para>
Height of arc of 
rectangle corner. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Draws a filled rectangle from (<tt CLASS=literal>x</tt>, 
<tt CLASS=literal>y</tt>) of size <tt CLASS=literal>width</tt> 
x <tt CLASS=literal>height</tt> with rounded corners. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.24">finalize</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.24.1">public void finalize()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Overrides <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Object.finalize()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Tells the garbage collector to dispose of graphics context. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.25">getClip</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.25.1">public abstract Shape getClip () <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
Shape describing the clipping are of the graphics context. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.26">getClipBounds</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.26.1">public abstract Rectangle getClipBounds() <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
Rectangle describing the clipping area of the graphics context. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.27">getClipRect</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.27.1">public abstract Rectangle getClipRect() <img src="gifs/wstar.gif" alt="(Deprecated)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
Replaced by <tt CLASS=literal>getClipBounds()</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.28">getColor</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.28.1">public abstract Color getColor()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The current drawing <tt CLASS=literal>Color</tt> of 
the graphics context. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.29">getFont</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.29.1">public abstract Font getFont()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The current <tt CLASS=literal>Font</tt> of the graphics 
context. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.30">getFontMetrics</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.30.1">public FontMetrics getFontMetrics()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The <tt CLASS=literal>FontMetrics</tt> of the current 
font of the graphics context. </DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.30.2">public abstract FontMetrics getFontMetrics (Font font)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>font</I><br>
<DD>

<P CLASS=para>
Font to get metrics 
for. </DL>
<p>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The <tt CLASS=literal>FontMetrics</tt> of the given 
font for the graphics context. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.31">setClip</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.31.1">public abstract void setClip (int x, int y, int width, int height) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>x</I><br>
<DD>

<P CLASS=para>
x coordinate of rectangle 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y</I><br>
<DD>

<P CLASS=para>
y coordinate of rectangle 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>width</I><br>
<DD>

<P CLASS=para>
width of rectangle 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>height</I><br>
<DD>

<P CLASS=para>
height of rectangle </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Changes current clipping region to the specified rectangle. </DL>
</DIV>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.31.2">public abstract void setClip (Shape clip) <img src="gifs/bstar.gif" alt="(New)" border=0></A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>clip</I><br>
<DD>

<P CLASS=para>
The new clipping shape. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Changes current clipping region to the specified shape. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.32">setColor</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.32.1">public abstract void setColor (Color color)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>color</I><br>
<DD>

<P CLASS=para>
New color. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Changes current drawing color of graphics context. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.33">setFont</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.33.1">public abstract void setFont (Font font)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>font</I><br>
<DD>

<P CLASS=para>
New font. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Changes current font of graphics context. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.34">setPaintMode</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.34.1">public abstract void setPaintMode()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Changes painting mode to normal mode. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.35">setXORMode</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.35.1">public abstract void setXORMode (Color xorColor)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>xorColor</I><br>
<DD>

<P CLASS=para>
XOR mode drawing 
color. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Changes painting mode to XOR mode; in this mode, drawing the same object 
in the same color at the same location twice has no net effect. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.36">toString</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.36.1">public String toString()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
A string representation of the <tt CLASS=literal>Graphics</tt> 
object. 

<p>
<DT CLASS=varlistentry>Overrides <br>
<DD>

<P CLASS=para>
<tt CLASS=literal>Object.toString()</tt> </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.37">translate</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-4.37.1">public void translate (int x, int y)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>x</I><br>
<DD>

<P CLASS=para>
x coordinate of new drawing 
origin. 

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>y</I><br>
<DD>

<P CLASS=para>
y coordinate of new drawing 
origin. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Moves the origin of drawing operations to (<tt CLASS=literal>x</tt>, 
<tt CLASS=literal>y</tt>). </DL>
</DIV>

</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="JAWT-CH-19-REF-GRAPHICS-SECT-5">See Also</A></h2>

<P CLASS=para>
<tt CLASS=literal>Color</tt>, <tt CLASS=literal>Font</tt>, 
<tt CLASS=literal>FontMetrics</tt>, <tt CLASS=literal>Image</tt>, 
<tt CLASS=literal>ImageObserver</tt>, <tt CLASS=literal>Object</tt>, 
<tt CLASS=literal>Polygon</tt>, <tt CLASS=literal>Rectangle</tt>, 
<tt CLASS=literal>Shape</tt>, <tt CLASS=literal>String</tt> 

</DIV>


<DIV CLASS=htmlnav>

<P>
<HR align=left width=515>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch19_26.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><a href="index.htm"><img src='gifs/txthome.gif' border=0 alt='Home'></a></td>
<td width=172 align=right valign=top><A HREF="ch19_28.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
<tr>
<td width=172 align=left valign=top>Frame</td>
<td width=171 align=center valign=top><a href="index/idx_a.htm"><img src='gifs/index.gif' alt='Book Index' border=0></a></td>
<td width=172 align=right valign=top>GridBagConstraints</td>
</tr>
</table>
<hr align=left width=515>

<IMG SRC="gifs/smnavbar.gif" USEMAP="#map" BORDER=0> 
<MAP NAME="map"> 
<AREA SHAPE=RECT COORDS="0,0,108,15" HREF="../javanut/index.htm"
alt="Java in a Nutshell"> 
<AREA SHAPE=RECT COORDS="109,0,200,15" HREF="../langref/index.htm" 
alt="Java Language Reference"> 
<AREA SHAPE=RECT COORDS="203,0,290,15" HREF="../awt/index.htm" 
alt="Java AWT"> 
<AREA SHAPE=RECT COORDS="291,0,419,15" HREF="../fclass/index.htm" 
alt="Java Fundamental Classes"> 
<AREA SHAPE=RECT COORDS="421,0,514,15" HREF="../exp/index.htm" 
alt="Exploring Java"> 
</MAP>
</DIV>

</BODY>
</HTML>
